<extend name="Base/common" />
<block name="Content">
    <div class="am-cf am-padding-top">
        <div class="am-fl am-cf">
            <i class="am-icon-file"></i>
            <strong class="am-text-primary am-text-lg">角色管理</strong>
        </div>
        <hr data-am-widget="divider" class="am-divider am-divider-default" />
    </div>
   
        <div class="am-u-sm-12 am-u-md-6" style="padding:0px">
            <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                    <a class="am-btn am-btn-success" href="{:U('editAction')}"><span class="am-icon-plus"></span>&nbsp;新增</a>
                    <button class="am-btn am-btn-warning ajax-post confirm" url="{:U('del')}" target-form="ck">
                        <span class="am-icon-trash-o"></span>
                        删除
                    </button>
                </div>
            </div>
        </div>
       <div class="am-fr am-padding-right am-u-md-3">
            	<form class="am-form" action="{:U('index')}" method="post">
                <div class="am-input-group am-input-group-sm">
                    <input type="text" class="am-form-field am-input-sm" placeholder="角色名称" name='rolename' value="{$rolename}"/><span class="am-input-group-btn">
                        <button class="am-btn am-btn-default" type="submit">
                            搜索
                        </button>
                    </span>
                </div>
			</form>
            </div>
           
       
  
    <table class="am-table am-table-striped am-table-hover table-main">
        <thead>
            <tr>
                <th class="table-check am-text-left" style="width:10%">
                    <input type="checkbox" class="checkAll" />
                </th>
                <th class="table-type am-text-left" style="width:30%">
                    权限级别
                </th>
                <th class="table-title am-text-left" style="width:30%">
                    角色名称
                </th>
                <th class="table-set am-text-left" style="width:30%">
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
            <notempty name="rolelist">
                <foreach name="rolelist" item="role">
                    <tr>
                        <td>
                            <input type="checkbox" name="roleids[]" value="{$role.role_id}" class="ck" />
                        </td>
                        <td>
                            {$role.role_level}
                        </td>
                        <td>
                            {$role.role_name}
                        </td>
                        <td>
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a class="am-btn am-btn-default am-btn-xs am-text-secondary" href="{:U('Role/editAction?role_id='.$role['role_id'])}"><span class="am-icon-pencil-square-o"></span>编辑</a>
                                    <a class="am-btn am-btn-default am-btn-xs am-text-success" href="{:U('Role/authority?role_id='.$role['role_id'].'&&name='.$role['role_name'])}"><span class="am-icon-gear"></span>设置权限</a>
                                    <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only ajax-get confirm" href="{:U('Role/del?roleids='.$role['role_id'])}"><span class="am-icon-trash-o"></span>删除</a>
                                </div>
                            </div>
                        </td>
                    </tr>
                </foreach>
                <else/>
                <td colspan="4" class="text-center">
                    aOh! 暂时还没有内容!
                </td>
            </notempty>
        </tbody>
    </table>
    <!-- 分页 -->
    <ul class="am-pagination am-pagination-default am-no-layout amz-social">
        {$_page}
    </ul>
    <!-- /分页 -->
</block>
<block name="style">
    <style type="text/css">
        .am-table {
            padding-left: 0px;
            margin-left: 0px
        }
    </style>
</block>
